import axios from "@/utils/request.ts";
import { routerArray } from "@/router/index 1"
export function nameSty(params) {
    let arr = []
    return axios.get("/sys/profile").then((res) => {
        let routerLo = routerArray.filter((item) => {
            return res.data.roles.menus.includes(item.name)
        })
        routerLo.unshift(routerArray[0])
        return routerLo
    })
}

export let as = async () => {
    let res = await axios.get("/sys/profile")
    let routerLo = routerArray.filter((item) => {
        return res.data.roles.menus.includes(item.name)
    })
    routerLo.unshift(routerArray[0])
    return routerLo
}